<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form
	id='sfForumAction'
	action="<?php echo url_for('sfForumCategory/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>"
	method="post"
	<?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
	<?php if (!$form->getObject()->isNew()): ?> <input type="hidden"
	name="sf_method" value="put" /> <?php endif; ?> <input type="hidden"
	value="<?php echo $sf_user->getGuardUser()->getId() ?>"
	name="category[author]" id="category_author" />

<div class='myforummenu'><a href="<?php echo url_for('sfForumCategory/index') ?>"><img src="/images/folder_full.png" />К разделам</a></div>
&nbsp;<div class='myforummenu'><?php echo link_to('<img src="/images/delete_folder.png" />Удалить', 'sfForumCategory/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?></div>
<br />
<br />

<table id="sfForumCategoryNew">
	<tfoot>
		<tr>
			<td colspan="2"><?php echo $form->renderHiddenFields(false) ?> 
			
				<?php if (!$form->getObject()->isNew()): ?> &nbsp;
				<?php endif; ?> <input class='forumbutton' type="submit"
				value="Сохранить" /></td>
		</tr>
	</tfoot>
	<tbody>
	<?php echo $form->renderGlobalErrors() ?>
		<tr>
			<th><?php echo $form['name']->renderLabel() ?></th>
			<td><?php echo $form['name']->renderError() ?> <?php echo $form['name'] ?>
			</td>
		</tr>
		<tr>
			<th><?php echo $form['description']->renderLabel() ?></th>
			<td><?php echo $form['description']->renderError() ?> <?php echo $form['description'] ?>
			</td>
		</tr>
	</tbody>
</table>
</form>
